Skip to content

Fix upgrade report record routing and status sequencing - #541

Open
JusterZhu wants to merge 1 commit into
masterfrom
justerzhu-upgrade-report-record-type
Open

JusterZhu wants to merge 1 commit into
masterfrom
justerzhu-upgrade-report-record-type

Conversation

@JusterZhu

Copy link
Copy Markdown
Collaborator

Summary

  • Route per-package reports using the poll/push record source propagated through client context and IPC, independently of package AppType.
  • Aggregate package results per record with failure taking precedence and avoid reporting staged main-app updates as applied. Document that applied success is not a health check.
  • Allow an isolated IPC provider and add regression coverage for polling/push and main/updater combinations, legacy contracts, shared-record failures, and launch errors.

Validation

  • Targeted CoreTest strategy and IPC tests: 30 passed.
  • Core release build for netstandard2.0, net8.0 and net10.0; CI AOT-compatible net10.0 build succeeded (existing dependency advisories and NETSDK1210 warning).

Cross-repository follow-up

Push reports need the actual per-client push RecordId. The existing SignalR string callback does not automatically map push payloads to a download source, and validation IDs identify polling records. A future integration should consume the server's per-client RecordId and exercise the real GeneralSpace/Bowl path end-to-end.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 22, 2026 15:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Critical issues can overwrite a successful upgrade record with an unrelated failure and lose accumulated per-record results when package processing throws, leaving incorrect or missing final statuses.

2 open issues
What changed in this PR

This PR corrects update-report routing and status sequencing across the client, platform strategy, and updater process.

Changes:

  • Propagates poll/push report type independently of package AppType.
  • Aggregates package outcomes per record with failure precedence and avoids reporting staged main-app updates as applied.
  • Adds injectable asynchronous IPC, regression tests, and documentation clarifying success semantics.
File Description
tests/​CoreTest/​Strategy/​ReportRoutingTests.cs Tests routing, staging, shared-record failures, legacy contracts, and launch errors.
src/​GeneralUpdate.Core/​Strategy/​UpdateStrategy.cs Synchronizes report-type overrides with update context.
src/​GeneralUpdate.Core/​Strategy/​ClientStrategy.cs Propagates report type, adds injectable IPC, and adjusts status reporting.
src/​GeneralUpdate.Core/​Strategy/​AbstractStrategy.cs Aggregates results per record and routes reports using context.
src/​GeneralUpdate.Core/​Download/​Reporting/​IUpdateReporter.cs Documents record sources and applied-success semantics.
docs/​core-execution-flow.md Updates IPC flow and reporting documentation.

Review effort: Balanced

Comment on lines +285 to +289
foreach (var record in recordStatuses)
{
try
{
await Reporter.ReportAsync(new UpdateReport(record.Key, record.Value, _configinfo.ReportType)).ConfigureAwait(false);
Comment on lines +1173 to 1174
.ReportAsync(new Download.Reporting.UpdateReport(_mainRecordId != 0 ? _mainRecordId : _upgradeRecordId,
(int)Download.Reporting.UpdateStatus.Failure, _reportType)).ConfigureAwait(false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants